﻿Module Funciones

    Public Function ExisteValor(ByVal Tabla As String, ByVal Columna As String, ByVal Valor As String) As Boolean
        Dim comando As New OleDb.OleDbCommand
        comando.Connection = Conexion
        comando.CommandText = "select count(*) from " & Tabla & " where " & Columna & "='" & Valor & "'"
        If comando.ExecuteScalar <> 0 Then
            Return True
        Else
            Return False
        End If
    End Function

End Module
